Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Getting and Playing Movies / Initializing the Movie Toolbox


EnterMovies

Before you call any Movie Toolbox functions, you must initialize the toolbox. Use the EnterMovies function to initialize the Movie Toolbox. When your application calls this function, the Movie Toolbox creates its private storage area for your application.

You should initialize any other Macintosh managers your application uses before calling the EnterMovies function.

pascal OSErr EnterMovies (void);
DESCRIPTION
If the EnterMovies function fails, it returns an error value--be sure to check the value returned by this function before using any other facilities of the Movie Toolbox.

In addition, you should use the Gestalt Manager to determine whether the Movie Toolbox is installed (see "Determining Whether the Movie Toolbox Is Installed" beginning on page 2-25 for more information).

Your application may call the EnterMovies function multiple times for a given A5 world, as long as you balance each invocation of EnterMovies with an invocation of ExitMovies.

SPECIAL CONSIDERATIONS
The Movie Toolbox identifies an application by the value in the A5 register. If you are writing a stand-alone code resource, you must ensure that A5 is the same whenever you call any Movie Toolbox functions.

ERROR CODES
Memory Manager errors

SEE ALSO
Listing 2-3 on page 2-30 provides an example of the EnterMovies function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996